package com.wisdom.demo.service;

import com.wisdom.demo.mapper.UserInfoMapper;
import com.wisdom.demo.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 11951
 * Date: 2025-03-21
 * Time: 11:12
 */
@Service
public class UserService {
    @Autowired
    private  UserInfoMapper userInfoMapper;
    public UserInfo queryUserBYPassword(String name, String password) {
        List<UserInfo> userInfos=userInfoMapper.queryUserByPassword(name,password);
        if(userInfos != null && userInfos.size()>0 ){
            return userInfos.get(0);
        }
        return null;
    }
}
